package net.csdn.business.auth.exception;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Getter;
import net.csdn.business.auth.serializer.CloudAuth2ExceptionSerializer;
import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;


/**
 * @Desc: 自定义OAuth2Exception异常
 * @ClassName: CloudAuth2Exception
 * @Author: yourleige@163.com
 * @Date: 2022/9/26 14:23
 */
@JsonSerialize(using = CloudAuth2ExceptionSerializer.class)
public class CloudAuth2Exception extends OAuth2Exception {

	@Getter
	private String errorCode;

	public CloudAuth2Exception(String msg) {
		super(msg);
	}

	public CloudAuth2Exception(String msg, Throwable t) {
		super(msg, t);
	}

	public CloudAuth2Exception(String msg, String errorCode) {
		super(msg);
		this.errorCode = errorCode;
	}

}
